package models

import (
	_"github.com/go-sql-driver/mysql"
	"github.com/astaxie/beego/orm"
	"github.com/typa01/go-utils"
	"fmt"
	"copyright-manager/form_structs"
)

//版本添加

type CopyRight struct{

	form_structs.CopyRightForm

}


func init(){


	orm.RegisterDriver("mysql",orm.DRMySQL)

	orm.RegisterDataBase("default","mysql","guoxinqiang:AAA7702247@tcp(39.109.123.30:3306)/bfe_club_manager?charset=utf8")


}


func ( c *CopyRight ) Search() orm.RawSeter {

	var result orm.RawSeter

	o := orm.NewOrm()

	result = o.Raw( "SELECT * FROM auth_group" )

	return result

}

//向数据库中插入一条数据
func (c *CopyRight ) Insert() error{

	guid := tsgutils.GUID()

	fmt.Println( guid )

	return nil

}
